<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>其他行为监管信息管理</title>
	<script src="../../js/header.js"></script>
	<style type="text/css">
		html, body, #jgxwother {
			padding: 0px;
			margin: 0px;
		}
		#jgxwother{
			border-top: 3px solid #0D9AFF;
			padding: 25px;
		}
		.tab-title{
			font-size: 16px;
			font-weight: bold;
			border-left: 4px solid #0D9AFF;
			font-family: PingFangSC-Medium;
			padding-left:10px;
			margin-bottom: 20px;
		}
		.el-dialog__footer {
			padding: 10px 20px 20px;
			text-align: center;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
		}
		.el-dialog__body {
			color: rgb(96, 98, 102);
			font-size: 14px;
			word-break: break-all;
			padding: 0px 20px;
		}
		#excel {
			display: none;
		}
		.el-input__inner {
			-webkit-appearance: none;
			background-color: #FFF;
			background-image: none;
			border-radius: 4px;
			border: 1px solid #DCDFE6;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			color: #606266;
			display: inline-block;
			font-size: inherit;
			height: 30px;
			line-height: 30px;
			outline: 0;
			padding: 0 15px;
			-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
			transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		}
		
		.listed .el-form-item__label{
			letter-spacing: 3px;
		}
		.el-textarea {
			width: 95%;
		}

		/* 搜索按钮样式修改 */
		#jgxwother .el-button.is-circle.search_btn{
			position: absolute;
			right: 0;
			top: 0;
			border: 0;
			background: none;
		}
		#jgxwother .el-button.is-circle.search_btn i{
			font-size: 17px;
		}

        .form_date_width .el-date-editor.el-input, .el-date-editor.el-input__inner {
            width : 100%;
        }
	</style>
</head>

<body>
<div v-cloak id="jgxwother">
	<div style="margin-top: 10px;">
		<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
			<el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
				<el-row>
					<el-col :span="8">
						<el-form-item label="监管事项目录编码:" prop="" label-width="160px">
							<el-input v-model="selectForm.superviseItemCode" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
					<el-col span="8">
						<el-form-item label="记录唯一标识:">
							<el-input v-model="selectForm.recordUniqueIdentity" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="8">
						<el-form-item label="行为名称:" prop="" label-width="160px">
							<el-input v-model="selectForm.actionName" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="行为编号:" prop="">
							<el-input v-model="selectForm.actionCode" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="8">
						<el-form-item label="检查行为编号:" prop="" label-width="160px">
							<el-input v-model="selectForm.checkBehaviorNumber" placeholder="" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="监管对象:" prop="" label-width="160px">
							<el-input v-model="selectForm.superviseObject" placeholder="" ></el-input>
						</el-form-item>
					</el-col>

					<div style="float: right;">
						<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="apply()">申请</el-button>
						<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm()">查询</el-button>
						<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm()">重置</el-button>
					</div>
				</el-row>
			</el-form>
		</div>

		<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
			<!--<el-table-column type="selection" ></el-table-column>-->
			<el-table-column
					prop="superviseItemCode"
					label="监管事项目录编码"
					width="150"
					align="center" >
			</el-table-column>
			<el-table-column
					prop="recordUniqueIdentity"
					label="记录唯一标识"
					width="200"
					align="center">
			</el-table-column>
			<el-table-column
					prop="actionName"
					label="行为名称"
					width="200"
					align="center">
			</el-table-column>
			<el-table-column
					prop="actionCode"
					label="行为编号"
					width="150"
					align="center">
			</el-table-column>
			<el-table-column
					prop="checkBehaviorNumber"
					label="检查行为编号"
					width="200"
					align="center">
			</el-table-column>
			<el-table-column
					prop="superviseObject"
					label="监管对象"
					width="200"
					align="center">
			</el-table-column>
			<el-table-column
					label="操作"
					width=""
					align="center">
				<template slot-scope="scope">
					<el-button size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
					<el-button type="primary" size="mini" @click="edit(scope.$index,scope.row)">修改</el-button>
					<el-button type="danger" size="mini" @click="del(scope.$index,scope.row)">删除</el-button>
				</template>
			</el-table-column>
		</el-table>
		<div style="overflow: hidden;">
			<div class="pagination">
				<el-pagination
						@size-change="handleSizeChange"
						@current-change="handleCurrentChange"
						:current-page="currentPage"
						:page-sizes="[10, 20, 30, 40]"
						:page-size="pagesize"
						background
						layout="total, sizes,prev, pager, next"
						:total="tableTotal"
						prev-text="上一页"
						next-text="下一页">
				</el-pagination>
			</div>
		</div>

		<!-- 其他行为监管信息详细页 -->
		<el-dialog title="" :visible.sync="dialogForm" center fullscreen>
			<div style="margin-top: 10px;">
				<el-form :model="jgxwother" :rules="rules" ref="jgxwother" label-width="140px" class="form_date_width">
					<!--其他行为监管信息表-->
					<el-row>
						<el-col :span="4" class="tab-title">
							其他行为监管信息表
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="监管事项目录编码:" prop="superviseItemCode" label-width="200px">
								<el-input v-model="jgxwother.superviseItemCode" placeholder="" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="记录唯一标识:" prop="recordUniqueIdentity" label-width="200px">
								<el-input v-model="jgxwother.recordUniqueIdentity" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
                        <el-col :span="12">
                            <el-form-item label="行为名称:" prop="actionName" label-width="200px">
                                <el-input v-model="jgxwother.actionName" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
						<el-col span="12">
							<el-form-item label="行为编号:" prop="actionCode" label-width="200px">
								<el-input v-model="jgxwother.actionCode" placeholder="" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
                    <el-row>
                        <el-col span="12">
                            <el-form-item label="检查行为编号:" prop="checkBehaviorNumber" label-width="200px">
                                <el-input v-model="jgxwother.checkBehaviorNumber" placeholder="" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="行政区划代码:" prop="areaNumber" label-width="200px">
                                <el-input v-model="jgxwother.areaNumber" placeholder="" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="监管对象:" prop="superviseObject" label-width="200px">
								<el-tooltip class="item" effect="dark" content="1、企业、个体户、农专社，填写为企业统一社会信用代码；
																				2、自然人时，填写身份证号；
																				3、特种设备时，填写生产企业统一社会信用代码#产品品牌#出厂日期
																				4、为特定产品（食品）时，填写生产企业统一社会信用代码#生产批号
																				5、为特定产品（三种特殊食品）时，填写生产企业统一社会信用代码#生产批号
																				6、特定产品为药品时，填写生产企业统一社会信用代码#生产许可证编号#生产批号
																				7、特定产品为化妆品时，填写生产企业统一社会信用代码#生产许可证编号#生产批号
																				8、特定产品为医疗器械时，填写生产企业统一社会信用代码#注册证编号#生产批号
																				9、为场地场所时，填写场地场所名称#所在地区" placement="top-start">
									<el-input v-model="jgxwother.superviseObject" placeholder="" :disabled="formDisabled"></el-input>
								</el-tooltip>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="事项来源:" prop="itemSource" label-width="200px">
								<el-input v-model="jgxwother.itemSource" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
                        <el-col :span="12">
                            <el-form-item label="实施机构:" prop="implementInstitutio" label-width="200px">
                                <el-input v-model="jgxwother.implementInstitutio" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
						<el-col :span="12">
							<el-form-item label="实施机构编码:" prop="implementInstitutioCode" label-width="200px">
								<el-input v-model="jgxwother.implementInstitutioCode" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
                        <el-col :span="12">
                            <el-form-item label="受委托部门:" prop="entrustDept" label-width="200px">
                                <el-input v-model="jgxwother.entrustDept" placeholder="" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
						<el-col :span="12">
							<el-form-item label="受委托部门编码:" prop="entrustDeptCode" label-width="200px">
								<el-input v-model="jgxwother.entrustDeptCode" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
                    </el-row>
                    <el-row>
						<el-col :span="12">
							<el-form-item label="行政相对人（单位/个人）:" prop="administrativeCp" label-width="200px">
								<el-input v-model="jgxwother.administrativeCp" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="行政相对人性质:" prop="administrativeCpNa" label-width="200px">
                                <el-select v-model="jgxwother.administrativeCpNa" placeholder="请选择行政相对人性质" :disabled="formDisabled" style="width: 100%;">
                                    <el-option
                                            v-for="item in cpNaData"
                                            :key="item.appId"
                                            :label="item.dictName"
                                            :value="item.dictName">
                                    </el-option>
                                </el-select>
                            </el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="行政相对人证件类型:" prop="administrativeCpCeType" label-width="200px">
                                <el-select v-model="jgxwother.administrativeCpCeType" placeholder="请选择行政相对人证件类型" :disabled="formDisabled" style="width: 100%;">
                                    <el-option
                                            v-for="item in cpCeTypeData"
                                            :key="item.appId"
                                            :label="item.dictName"
                                            :value="item.dictName">
                                    </el-option>
                                </el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="行政相对人(单位/个人)编码:" prop="administrativeCpUiCode" label-width="200px">
								<el-input v-model="jgxwother.administrativeCpUiCode" placeholder="" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="注册地址:"  prop="addressRegistered" label-width="200px">
								<el-input v-model="jgxwother.addressRegistered" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="经营地址:"  prop="addressOperating" label-width="200px">
								<el-input v-model="jgxwother.addressOperating" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>

						<el-col :span="12">
							<el-form-item label="监管措施:" prop="superviseMeasure" label-width="200px">
								<el-input v-model="jgxwother.superviseMeasure" placeholder="" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
                        <el-col :span="12">
                            <el-form-item label="结案情况:" prop="closingCase" label-width="200px">
                                <el-input v-model="jgxwother.closingCase" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="开始时间:" prop="startDate" label-width="200px">
								<el-date-picker
										v-model="jgxwother.startDate"
										type="date"
										value-format="yyyy-MM-dd"
										placeholder="选择开始时间"
										:disabled="formDisabled">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="结束时间:" prop="endDate" label-width="200px">
								<el-date-picker
									v-model="jgxwother.endDate"
									type="date"
									value-format="yyyy-MM-dd"
									placeholder="选择结束时间"
									:disabled="formDisabled">
								</el-date-picker>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="报送时间:" prop="submittedDate" label-width="200px">
								<el-date-picker
										v-model="jgxwother.submittedDate"
										type="date"
										value-format="yyyy-MM-dd"
										placeholder="选择报送时间"
										:disabled="formDisabled">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="报送人员:" prop="submittedPersonnel" label-width="200px">
								<el-input v-model="jgxwother.submittedPersonnel" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="插入时间:" prop="inputTime" label-width="200px">
								<el-date-picker
										v-model="jgxwother.inputTime"
										type="date"
										value-format="yyyy-MM-dd"
										placeholder="选择插入时间"
										:disabled="formDisabled">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="来源:" prop="actionSource" label-width="200px">
								<el-input v-model="jgxwother.actionSource" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="批次号:" prop="batchNumberCode" label-width="200px">
								<el-input v-model="jgxwother.batchNumberCode" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="同步类型:" prop="synchroType" label-width="200px">
								<el-input v-model="jgxwother.synchroType" :disabled="formDisabled"></el-input>
							</el-form-item>
						</el-col>

					</el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="数据来源:" prop="recordSource" label-width="200px">
								<el-tooltip class="item" effect="dark" content="数据来源由三位数字组成。其中，第1位填写：0或者1，0代表应急管理部部本级，1代表地方。当第1位填写0时，第2、3位填写“部本级业务系统”代码集中对应的代码；当第1位填写1时，第2、3位填写“行政区划代码”代码集中对应的代码。" placement="top-start">
									<el-input v-model="jgxwother.recordSource" :disabled="formDisabled"></el-input>
								</el-tooltip>
                            </el-form-item>
                        </el-col>
                    </el-row>

					<el-row>
						<el-col :span="22">
							<div style="float:right;">
								<el-button v-show="showOnSubmit" type="primary" size="small" style="width: 60px;height: 30px;" @click="onSubmit()">提交</el-button>
								<el-button v-show="showOnReplace" type="primary" size="small" style="width: 60px;height: 30px;" @click="onReplace()">修改</el-button>
								<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogForm = false;clearForm()">取消</el-button>
							</div>
						</el-col>
					</el-row>
				</el-form>
			</div>
		</el-dialog>
	</div>
</div>
<script>
    var vm = new Vue({
        el: '#jgxwother',
        data() {
            return {
                provinceData: [],
				cityData:[],
				areaData: [],

                // 行政相对人性质
                cpNaData : [],
                // 行政相对人证件类型数组
                cpCeTypeData : [],


                currentPage: 1, //默认显示页面为1
                pagesize: 5, // 每页的数据条数
                tableTotal:'',

				jgxwother: {
                    actionId: '',// 表单id
                    superviseItemCode: '',
                    recordUniqueIdentity: '',
                    actionName: '',
                    actionCode: '',
                    checkBehaviorNumber: '',
                    superviseObject: '',
                    itemSource: '',
                    implementInstitutio: '',
                    implementInstitutioCode: '',
                    entrustDept: '',
                    entrustDeptCode: '',
                    administrativeCp: '',
                    administrativeCpNa: '',
                    administrativeCpCeType: '',
                    administrativeCpUiCode: '',
                    addressRegistered: '',
                    addressOperating: '',
                    areaNumber: '',
                    superviseMeasure: '',
                    closingCase: '',
                    startDate: '',
                    endDate: '',
                    submittedDate: '',
                    submittedPersonnel: '',
                    inputTime: '',
                    actionSource: '',
                    batchNumberCode: '',
                    synchroType: '',
                    recordSource: '',

                },
                formDisabled: false,
                rules: {
                    superviseItemCode: [{
                        required: true,
						message: '监管事项目录编码',
						trigger: 'blur'
					},{
                        max : 50,
						message : '长度最大为50个字符',
						trigger : 'blur'
					}],
                    recordUniqueIdentity:[{
						required: true,
						message: '请输入记录唯一标识',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    actionName: [{
                        required: true,
						message: '请输入行为名称',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    actionCode: [{
                        required: true,
						message: '请输入行为编号',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    checkBehaviorNumber: [{
                        required: true,
						message: '请输入检查行为编号',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    superviseObject: [{
                        required: true,
						message: '请输入监管对象',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    itemSource: {
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    },
                    implementInstitutio: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    implementInstitutioCode: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    entrustDept: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    entrustDeptCode: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    administrativeCp: [{
                        required: true,
						message: '请输入行政相对人（单位/个人）',
						trigger: 'blur'
					},{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    administrativeCpNa: [{
                        // required: true,
                        // message: '请输入行政相对人性质',
                        // trigger: 'blur'
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    administrativeCpCeType: [{
                        // required: true,
                        // message: '请输入行政相对人证件类型',
                        // trigger: 'blur'
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    administrativeCpUiCode: [{
                        required: true,
                        message: '请输入行政相对人(单位/个人)编码',
                        trigger: 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
					}],
					addressRegistered: [{
						max : 50,
						message : '长度最大为50个字符',
						trigger : 'blur'
					}],
                    addressOperating: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    superviseMeasure: [{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    closingCase : [{
                        max : 500,
                        message : '长度最大为500个字符',
                        trigger : 'blur'
					}],
                    areaNumber: [{
                        required: true,
                        message: '请输入行政区划代码',
                        trigger: 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    submittedDate: [{
                        required: true,
                        message: '请选择报送时间',
                        trigger: 'blur'
                    }],
                    submittedPersonnel: [{
                        // required: true,
                        // message: '请输入报送人',
                        // trigger: 'blur'
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
                    }],
                    inputTime: [{
                        required: true,
                        message : '请选择插入时间',
                        trigger: 'blur'
                    }],
                    actionSource: [{
                        required: true,
                        message : '请输入来源',
                        trigger : 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
					}],
                    batchNumberCode: [{
                        required : true,
                        message : '请输入批次号',
                        trigger : 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
					}],
                    synchroType: [{
                        required : true,
                        message : '请输入同步类型',
                        trigger : 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
					}],
                    recordSource: [{
                        required : true,
                        message : '请输入数据来源',
                        trigger : 'blur'
                    },{
                        max : 50,
                        message : '长度最大为50个字符',
                        trigger : 'blur'
					}],

                },
                dialogForm: false,
                selectForm: {
                    superviseItemCode: '',
                    recordUniqueIdentity: '',
                    actionName: '',
                    actionCode: '',
                    checkBehaviorNumber: '',
                    superviseObject: ''
                },

                currentRow: null,
                tableData: [],
                showOnSubmit: true,
                showOnReplace: false
            }
        },
        created() {
            /* 地区加载数据 */
            axios.get('../../json/ChinaCity.json').then(res => {
                this.provinceData = res.data;
			}).catch(e => {
					this.$message.error("网络连接超时");
			})

   			/* 行政相对人证件类型加载数据 */
            axios.post('/dzjap/dict/getdict/d_administrativeCpCeType').then(res => {
                this.cpCeTypeData = res.data.data.result;
            }).catch(e => {
                this.$message.error("网络连接超时");
            })


            /* 行政相对人性质加载数据 */
            axios.post('/dzjap/dict/getdict/d_administrativeCpNa').then(res => {
                this.cpNaData = res.data.data.result;
            }).catch(e => {
                this.$message.error("网络连接超时");
            })



        },
        mounted(){
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;

                axios({
                    method: 'get',
                    url: '/dzjap/other/getAllOther',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let dataInformation = data.data.results;
						this.tableTotal = data.data.total;// 数据长度

						this.tableData = dataInformation;
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },
            // 表单提交
            onSubmit() {
                this.$refs.jgxwother.validate((valid) => {
                    if (valid) {
                        axios({
                            method: 'post',
                            url: '/dzjap/other/addOther',
                            data: this.jgxwother
                        })
                            .then((response) => {
                                let data = response.data;
                                if (data.code == 200) {
                                    this.dialogForm = false;
                                    this.$message({
                                        type: 'success',
                                        message: '添加成功!'
                                    });
                                    this.getData();
                                } else {
                                    this.$message.error(data.msg);
                                }
                            });
                    }
                })

            },
            // 表单修改
            onReplace(){
                this.$refs.jgxwother.validate((valid) => {
                    if (valid) {
                        axios({
                            method: 'post',
                            url: '/dzjap/other/updateOther',
                            data: this.jgxwother
                        })
						.then((response) => {
							let data = response.data;
							if (data.code == 200) {
								this.dialogForm = false;
								this.$message({
									type: 'success',
									message: '修改成功!'
								});
								this.getData();
							} else {
								this.$message.error(data.msg);
							}
						});
                    }
                })

            },
            clearForm(){
                this.$refs.jgxwother.clearValidate();
                this.jgxwother.actionId = '';
                this.jgxwother.superviseItemCode = '';
                this.jgxwother.recordUniqueIdentity = '';
                this.jgxwother.actionName = '';
                this.jgxwother.actionCode = '';
                this.jgxwother.checkBehaviorNumber = '';
                this.jgxwother.superviseObject = '';
                this.jgxwother.itemSource = '';
                this.jgxwother.implementInstitutio = '';
				this.jgxwother.implementInstitutioCode = '';
				this.jgxwother.entrustDept = '';
				this.jgxwother.entrustDeptCode = '';
				this.jgxwother.administrativeCp = '';
				this.jgxwother.administrativeCpNa = '';
				this.jgxwother.administrativeCpCeType = '';
				this.jgxwother.administrativeCpUiCode = '';
				this.jgxwother.addressRegistered = '';
				this.jgxwother.addressOperating = '';
				this.jgxwother.areaNumber = '';
				this.jgxwother.superviseMeasure = '';
                this.jgxwother.closingCase = '';
                this.jgxwother.startDate = '';
                this.jgxwother.endDate = '';
                this.jgxwother.submittedDate = '';
                this.jgxwother.submittedPersonnel = '';
                this.jgxwother.inputTime = '';
                this.jgxwother.actionSource = '';
                this.jgxwother.batchNumberCode = '';
                this.jgxwother.synchroType = '';
                this.jgxwother.recordSource = '';

            },
            handleChange(value) {
                console.log(value);
            },
            apply(){
                this.dialogForm = true;
                this.showOnSubmit = true;
                this.showOnReplace = false;

                this.clearForm();

                this.formDisabled = false;
            },
            /* 单选搜索表单 */
            selectCurrentChange(val){
                this.currentRow = val;
            },
            /* 列表页搜索 */
            searchForm() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;

                axios({
                    method: 'get',
                    url: '/dzjap/other/getAllConOther',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        superviseItemCode: this.selectForm.superviseItemCode,
                        recordUniqueIdentity: this.selectForm.recordUniqueIdentity,
                        actionName: this.selectForm.actionName,
                        actionCode: this.selectForm.actionCode,
                        checkBehaviorNumber: this.selectForm.checkBehaviorNumber,
                        superviseObject: this.selectForm.superviseObject,

                    }
                })
                .then(response => {
                    let data = response.data;
                    console.log(data);
                    if (data.code == 200) {
                        let dataInformation = data.data.results;
                        this.tableTotal = data.data.total;// 数据长度

                        this.tableData = dataInformation;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            /* 列表页重置 */
            resetForm(formName) {
                this.selectForm.superviseItemCode = '';
				this.selectForm.recordUniqueIdentity = '';
                this.selectForm.actionName = '';
                this.selectForm.actionCode = '';
                this.selectForm.checkBehaviorNumber = '';
				this.selectForm.superviseObject = '';
                this.getData();
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 设置允许填写和不允许填写
            checkDisabled(n){
                if(n){
                    this.formDisabled = true;
                }else{
                    this.formDisabled = false;
                }
            },
            /* 选择省份 */
            chooseProvince(value) {
                this.editcityValue = '';
                this.editareaValue = '';
                this.cityData = [];
                this.areaData = [];
                this.provinceData.map(e => {//遍历数据
                    if (value == e.name) {
                    this.cityData = e.cityList;
                    return;
                }
            })
                console.log(value)
                this.editprovinceValue = value;
            },
            /* 选择城市 */
            chooseCity(value) {
                this.editareaValue = '';
                this.cityData.map(e => {//遍历数据
                    if (value == e.name) {
                    this.areaData = e.areaList;
                    return;
                }
            })
                console.log(value)
                this.editcityValue = value;
            },
            /* 选择区域 */
            chooseArea(value) {
                console.log(value)
                this.newareaValue = value;
                this.jgxwother.addressRegistered = this.provinceValue + "-" + this.cityValue + "-" + this.areaValue;

            },
            // 删除
            del(index,row){
                var id = row.actionId;

                this.$confirm('确定要删除吗?', '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
                    axios({
                        method: 'post',
                        url: '/dzjap/other/deleteOther/',
						params: {
                            actionId: id,
						}
                    })
					.then(response => {
						let data = response.data;

						if (data.code == 200) {
							// 确认删除
							this.$message({
								type: 'success',
								message: '删除成功!'
							});
							this.getData();
						} else {
							this.$message.error(data.msg);
						}
					})
					.catch(function (error) {
						console.log(error);
					});
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消删除'
                    });
                });
            },
            // 查看
            view(index,row){
                this.dialogForm = true;
                this.showOnReplace = false;
                this.showOnSubmit = false;

                this.showInformation(index,row);
                this.checkDisabled(true);
            },
            // 修改
            edit(index,row){
                this.dialogForm = true;
                this.showOnReplace = true;
                this.showOnSubmit = false;

                this.showInformation(index,row);
                this.checkDisabled(false);
            },
            // 公共方法--查看
            showInformation(index,row){
                console.log(row);

                axios({
                    method: 'get',
                    url: '/dzjap/other/getOther',
                    params: {
                        actionId: row.actionId
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let rowdata = response.data.data;
						this.clearForm(); // 重置

						this.jgxwother = rowdata;
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            }
        }
    })
</script>
</body>
</html>